package com.sundaying.gooway.action;

import java.util.List;

import javax.annotation.Resource;

import com.opensymphony.xwork2.ActionSupport;
import com.sundaying.gooway.entity.TopClass;
import com.sundaying.gooway.service.TopClassService;

public class TopClassAction extends ActionSupport {
	private TopClassService topClassService;
	private List<TopClass> topClassList;
	private TopClass topClass;
	private int id;

	public TopClassService getTopClassService() {
		return topClassService;
	}

	@Resource
	public void setTopClassService(TopClassService topClassService) {
		this.topClassService = topClassService;
	}

	public List<TopClass> getTopClassList() {
		return topClassList;
	}

	public void setTopClassList(List<TopClass> topClassList) {
		this.topClassList = topClassList;
	}

	public TopClass getTopClass() {
		return topClass;
	}

	public void setTopClass(TopClass topClass) {
		this.topClass = topClass;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String add() {
		topClassService.add(topClass);
		return this.SUCCESS;
	}

	public String list() {
		topClassList = topClassService.list();
		return this.SUCCESS;
	}

	public String update() {
		topClassService.update(topClass);
		return this.SUCCESS;
	}

	public String delete() {
		topClassService.delete(id);
		return this.SUCCESS;
	}

}
